package com.dick.base.parameter;

import com.dick.base.util.ValidateMessageCodes;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

@Data
public class DictValueParameter {

    private Long id;

    @Size(min = 1, max = 64, message = ValidateMessageCodes.DICT_CODE_SIZE)
    @NotEmpty(message = ValidateMessageCodes.DICT_CODE_EMPTY)
    private String code;
    @Size(min = 1, max = 128, message = ValidateMessageCodes.DICT_VALUE_CODE_LABEL_SIZE)
    @NotEmpty(message = ValidateMessageCodes.DICT_VALUE_CODE_LABEL_EMPTY)
    private String codeLabel;
    @Size(min = 1, max = 128, message = ValidateMessageCodes.DICT_VALUE_CODE_VALUE_SIZE)
    @NotEmpty(message = ValidateMessageCodes.DICT_VALUE_CODE_VALUE_EMPTY)
    private String codeValue;

    private Long parentId;
    private Integer sortCode = 0;
}
